<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="查看业务单" />
<%@ include file="../inc/Title.jsp"%>
<head>
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<script language="javascript">
	function doCancel(){
		window.close();
	}
</script>
</head>
<body oncontextmenu="return false"  class="sheet modal-dialog" style=" padding-top:10px;text-align:center;" >
<div class="sheet-main" style="width:980px;margin:auto;text-align:left;">
  <div class="sheet-list" >
    <div class="modal-main search-business">
		<div style="width:100%;">
		<table border="0" cellspacing="0" cellpadding="0" align="center" class="table-0">
			<tr>
				<td style="width:33%" rowspan="2"></td>
				<td style="width:33%;text-align:center" rowspan="2"><h2>查看业务单</h2></td>
				<td style="width:34%" class="tr">
					编号：${record.businessBill.billCode}
				</td>
			</tr>
			<tr>
				<td class="tr">订货日期：<fmt:formatDate value="${record.businessBill.orderDate}" pattern="yyyy-MM-dd HH:mm"/></td>
			</tr>
		</table>
		
		<table border="0" cellspacing="0" cellpadding="0" align="center" class="table-0">
		    <tr>
				<td class="InfoTitleDivider"></td>
			</tr>
		</table>
		
		<table border="0" cellspacing="0" cellpadding="0" align="center" class="table-0">
			<tr>
		      	<th style="width:6%">客户：</th>
		      	<td style="width:26%">${record.clientName}<span class="lbClientNote">${record.clientLevel}</span></td>
		      	<th style="width:8%">联系人：</th>
		     	<td style="width:16%">${record.businessBill.linkman}</td>
		     	<th style="width:6%">电话：</th>
		     	<td style="width:16%">${record.businessBill.phone}
		    	<td class="tr" style="width:22%">合同号：${record.businessBill.contractCode}</td>
		    </tr>
		</table>
		
		<table border="0" cellspacing="0" cellpadding="0" align="center" class="table-0">
		    <tr>
				<td class="InfoTitleDivider"></td>
			</tr>
		</table>
		
		<div class="table-list">
			<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
				<tbody>
				<tr >
					<th width="10%">项目类型</th>
					<th width="16%">内容</th>
					<th width="14%">材质</th>
					<th width="14%">规格</th>
					<th width="16%">制作要求</th>
					<th width="6%">数量</th>
					<th width="6%">外协</th>
					<th width="10%">工作中心</th>
					<th width="8%">完工状态</th>
				</tr>
				<c:forEach var="item" items="${record.items}" varStatus="i">
				<c:if test="${item.businessBillItem.isSetu=='Y'}">
				<tr>
					<td>${item.makeTypeName}</td>
					<td><commonTag:parseEnterToBr source="${item.businessBillItem.finishedContent}" /></td>
					<td>${item.businessBillItem.proName}</td>
					<td><commonTag:parseEnterToBr source="${item.businessBillItem.specification}" /></td>
					<td><commonTag:parseEnterToBr source="${item.businessBillItem.setupRequire}" /></td>
					<td>${item.businessBillItem.amount}</td>
					<td>
						<c:if test="${item.businessBillItem.isCoop=='Y'}">是</c:if>
					</td>
					<td><commonTag:showSimpleObjectName list="${workCenterList}" objectId="${item.businessBillItem.wcId}" /></td>
					<td>
						<c:if test="${item.businessBillItem.wcId!=0}">
							<c:if test="${item.businessBillItemExt.wcComp=='Y'}">自制已完</c:if>
							<c:if test="${item.businessBillItemExt.wcComp=='N'}">自制未完</c:if>
						</c:if>
						<c:if test="${item.businessBillItem.isCoop=='Y'}">
							<c:if test="${item.businessBillItem.wcId!=0}"><br></c:if>
							<c:if test="${item.businessBillItemExt.coopComp=='Y'}">外协已完</c:if>
							<c:if test="${item.businessBillItemExt.coopComp=='N'}">外协未完</c:if>
						</c:if>
					</td>
				</tr>
				</c:if>
				</c:forEach>
				</tbody>
		  </table>
	  </div>

		<table border="0" cellspacing="0" cellpadding="0" align="center" class="table-0">
		    <tr>
				<td class="InfoTitleDivider"></td>
			</tr>
		</table>
		
		<table border="0" cellspacing="0" cellpadding="0" align="center" class="table-a2 BillElseInfo">
			<tr>
				<th>部门：</th>
				<td >${record.departmentName}</th>
				<th>安装要求：</th>
		      	<td>${record.businessBill.setupRequire}</td>
				<th>摘要：</th>
		      	<td >${record.businessBill.content}</td>
			</tr>
			<tr>
				<th>业务员：</td>
				<td >${record.businessBill.managerName}</td>
				<th>提货要求：</th>
		      	<td >${record.businessBill.ladingRequire}</td>
		      	<th>备注：</th>
		      	<td>${record.businessBill.mark}</td>
			</tr>
			<tr>
				<th>设计员：</td>
				<td >${record.businessBill.designerNameStr}</td>
				<th>交货日期：</th>
		    	<td ><c:if test="${record.businessBill.deliverDate!=null}"><fmt:formatDate value="${record.businessBill.deliverDate}" pattern="yyyy-MM-dd HH:mm"/></c:if></td>
		    	<th>&nbsp;</th>
		      	<td>&nbsp;</td>
			</tr>
		</table>
		
		<table border="0" cellspacing="0" cellpadding="0" align="center" class="table-0">
		    <tr>
				<td class="InfoTitleDivider"></td>
			</tr>
		</table>
		
		<p class="give">
			<span>开单人：${record.businessBill.createrName} <c:if test="${record.businessBill.createTime!=null}"><fmt:formatDate value="${record.businessBill.createTime}" pattern="yyyy-MM-dd HH:mm"/></c:if></span>
			<span>审核人：<c:if test="${record.businessBillExt.examinerId!=0}">${record.businessBillExt.examinerName} <c:if test="${record.businessBillExt.examineTime!=null}"><fmt:formatDate value="${record.businessBillExt.examineTime}" pattern="yyyy-MM-dd HH:mm"/></c:if></c:if></span>
			<span>结清：${record.businessBillExt.closerName} <fmt:formatDate value="${record.businessBillExt.closeTime}" pattern="yyyy-MM-dd HH:mm"/></span>
			<span>最后打印：<c:if test="${record.businessBillExt.lastPrinter!=null && record.businessBillExt.lastPrinter!=''}">${record.businessBillExt.lastPrinter} / 已打印${record.businessBillExt.printNum}次</c:if></span>
			<span>修改人：<c:if test="${record.businessBill.modifierId!=0}">${record.businessBill.modifierName} <fmt:formatDate value="${record.businessBill.modifyTime}" pattern="yyyy-MM-dd HH:mm"/></c:if></span>
			<span>单据帐套：${record.tallySetName}</span>
		</p>
		
		</div>
  	</div>
  </div>
	<div class="modal-buttom">
		<input type="button" class="buttom-a" value=" 退 出 " onClick="doCancel();">
	</div>  
</div>
</body>
</html>